<ion-searchbar [debounce]="1000" (ionClear)="handleClear()" (ionInput)="handleInput($event)"></ion-searchbar>

<ion-content>
    <div class="content" id="con">
        <div class="content-column">
            <ng-container *ngFor="let medium of MediumData;let idx=index; ">
                <ion-card *ngIf="idx%2!=0" class="HomeComponent" (click)="goDetail(medium?.get('mediumId'),medium?.get('userId'))">
                    <div class="medium-img">
                        <img src="{{medium?.get('medium')}}">
                        
                    </div>
                    <div class="medium-text">
                        <p>{{medium?.get('text')}}</p>
                    </div>
                    <div class="medium-bottom">
                        <div class="medium-bottom-left">
                            <img src="{{medium?.get('user')?.get('img')}}">
                            <span>{{medium?.get('user')?.get("name")}}</span>
                        </div>
                        <div class="medium-bottom-right">
                            <span>{{medium?.get('likeNum') | toK}}</span>
                        </div>
                    </div>
                </ion-card>
            </ng-container>
        </div>


        <div class="content-column">
            <ng-container *ngFor="let medium of MediumData;let idx=index;">
                <ion-card *ngIf="idx%2==0" class="HomeComponent"(click)="goDetail(medium?.get('mediumId'),medium?.get('userId'))" >
                    <div class="medium-img">
                        <img src="{{medium?.get('medium')}}">
                    </div>

                    <div class="medium-text">
                        <p>{{medium?.get('text')}}</p>
                    </div>
                    <div class="medium-bottom">
                        <div class="medium-bottom-left">
                            <img src="{{medium?.get('user')?.get('img')}}">
                            <span>{{medium?.get('user')?.get("name")}}</span>
                        </div>
                        <div class="medium-bottom-right">
                            <div>{{medium?.get('likeNum') | toK}}</div>
                        </div>
                    </div>
                </ion-card>
            </ng-container>
        </div>


    </div>
    <ion-infinite-scroll (ionInfinite)="onIonInfinite($event)">
        <ion-infinite-scroll-content></ion-infinite-scroll-content>
    </ion-infinite-scroll>
</ion-content>